/* forkTest2.c
 *	Simple program to test whether "sort" and "matmult" works together or not.
 *
 *      Expected result: Two processes should be created and both should be able to run simulteniously.
 *      Actual result: Two process are created and gets executed. Nacos terminates indicating exit status of whichever ends last.
 * 
 */

#include "syscall.h"

void forkedFunc2(void) {

    Write("\n#### fork2###\n\0", 15, ConsoleOutput);
    Exec("../test/sort");
    Exit(41);
}

void forkedFunc(void) {

    Write("\n#### fork1###\n\0", 15, ConsoleOutput);
    Exec("../test/matmult");
    Exit(4);
}

void main() {
    Fork((void*) forkedFunc);
    Fork((void*) forkedFunc2);
    Exit(0);
}
